package com.lighting.module3;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;


@Controller
public class HelloController {
    @RequestMapping("/hello")
    @ResponseBody
    @CrossOrigin
    String Hi(String name) {
        return "Hello, " + name +" !";
    }

    @RequestMapping("/bye")
    @ResponseBody
    @CrossOrigin
    String Bye() {
        return "Goodbye";
    }
}
